/**

    Complete rewrite of original WebSpeed web-disp.p.  This is the entry point
    for bootstrapping webspeed into an OO environment instead of the legacy 
    procedural baed environment.

*/

using OpenEdge.WebSpeed.Container from propath.

define variable container as Container no-undo.

container = new Container().

container:InitContainer().

on "WEB-NOTIFY":U anywhere 
    do:
        container:WebNotify().
    end.


/* Wait for a web-request to come in */
WAIT-FOR-BLOCK: 
repeat on error undo WAIT-FOR-BLOCK, leave WAIT-FOR-BLOCK 
    on quit  undo WAIT-FOR-BLOCK, leave WAIT-FOR-BLOCK
    on stop  undo WAIT-FOR-BLOCK, next  WAIT-FOR-BLOCK:
       
    wait-for "WEB-NOTIFY":U of default-window.
       
end.

if valid-object(container) then 
do:
    container:Dispose().
  
    delete object container.

end.